#pragma comment (linker, "/STACK:100000000")
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
#define N 1000100
#define R 750
int h[R][R], x[N], y[N], r[N], w[N], ri, rj;
vector <int> m[N];
bool in(int i, int j)
{
	return (x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j])<=r[j]*r[j];
}
bool in(int x1, int y1, int r1, int x2, int y2, int r2)
{
	int x, y11, y12, y21, y22;
	if(r2>r1) return 0;
	if((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)<=(r1-r2)*(r1-r2)) return 1;
	if((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)>(r1-r2+3)*(r1-r2+3)) return 0;
	for(x=max(x1-r1, x2-r2); x<=min(x1+r1, x2+r2); x++)
	{
		y11=y1-h[r1][abs(x-x1)];
		y12=y1+h[r1][abs(x-x1)];
		y21=y2-h[r2][abs(x-x2)];
		y22=y2+h[r2][abs(x-x2)];
		if(y21<y11 || y22>y12) return 0;
	}
	return 1;
}
bool out(int x1, int y1, int r1, int x2, int y2, int r2)
{
	int x, y11, y12, y21, y22;
	if((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)>(r1+r2)*(r1+r2)) return 1;
	for(x=max(x1-r1, x2-r2); x<=min(x1+r1, x2+r2); x++)
	{
		y11=y1-h[r1][abs(x-x1)];
		y12=y1+h[r1][abs(x-x1)];
		y21=y2-h[r2][abs(x-x2)];
		y22=y2+h[r2][abs(x-x2)];
		if(y11<=y22 && y21<=y12) return 0;
	}
	return 1;
}
bool dfs(int i)
{
	int j, k;
	for(j=0; j<m[i].size(); j++)
	{
		if(!in(x[i], y[i], r[i], x[m[i][j]], y[m[i][j]], r[m[i][j]])) { ri=i; rj=m[i][j]; return 1; }
		for(k=j+1; k<m[i].size(); k++)
			if(!out(x[m[i][k]], y[m[i][k]], r[m[i][k]], x[m[i][j]], y[m[i][j]], r[m[i][j]])) { ri=m[i][k]; rj=m[i][j]; return 1; }
	}
	for(j=0; j<m[i].size(); j++)
		if(dfs(m[i][j])) return 1;
	return 0;
}
int main()
{
	int n, i, j, k;
	for(i=0; i<R; i++)
		for(k=i, j=0; j<=i; h[i][j]=k, j++)
			for(; k*k+j*j>i*i; k--);
	x[0]=R/1.5;
	y[0]=R/1.5;
	r[0]=R-1;
	j=0;
	w[j++]=0;
	for(scanf("%d", &n), i=1; i<=n; i++)
	{
		scanf("%d%d%d", &x[i], &y[i], &r[i]);
		if(i>1 && x[i]==x[i-1] && y[i]==y[i-1] && r[i]==r[i-1]) continue;
		for(; !in(i, w[j-1]); j--);
		m[w[j-1]].push_back(i);
		w[j++]=i;
	}
	if(!dfs(0)) printf("Ok\n");
	else printf("%d %d\n", ri, rj);
	return 0;
}